﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using System.Runtime.InteropServices;
using CameraWrapper;

namespace TestUI
{
    public partial class TestSuite : Form
    {
        public TestSuite()
        {
            InitializeComponent();
        }

        private void butCam1_Click(object sender, EventArgs e)
        {
            CameraTestSuite frm = new CameraTestSuite();
            this.Hide(); frm.ShowDialog(); frm.Dispose(); this.Show(); 
            // Need to call frm.Dispose() after frm.ShowDialog() to release resource.
            // If use frm.Show() then when frm Close will auto call Dispose so no need.
            // See this thread for detail : https://ptsc.codeplex.com/discussions/436314
        }
        
        private void button3_Click(object sender, EventArgs e)
        {
            DBHelperTest frm = new DBHelperTest();
            this.Hide(); frm.ShowDialog(); frm.Dispose(); this.Show(); 
        }

        private void button4_Click_1(object sender, EventArgs e)
        {
            UCLTest frm = new UCLTest();
            this.Hide(); frm.ShowDialog(); frm.Dispose(); this.Show(); 
        }

    }
}
